/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package sda.levelup.lists.hashs;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

/**
 *
 * @author user
 */
public class HashTest
{

    public static void main(String[] args) throws IOException
    {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String sername = "";
        double money;
        Storage storage = new Storage();
        System.out.println("Creating Accounts");
        while (true)
        {
            System.out.println("Print sername(nothing to stop): ");
            sername = reader.readLine();
            if (sername.equals(""))
            {
                break;
            }
            System.out.println("Print amount of money: ");
            money = Double.parseDouble(reader.readLine());

            Account tmp = new Account(sername, money);
            storage.put(sername, tmp);
        }
        while (true)
        {
            System.out.println("Print sername to check amount of money(nothing to stop): ");
            String s = reader.readLine();
            if (sername.equals(""))
            {
                break;
            }
            System.out.println("Your money: ");
            System.out.println(storage.get(s));

        }
    }

}
